package com.hhp.cloud.shop.auth.feign;

import com.hhp.cloud.shop.auth.feign.fallback.UserFeignServiceFallback;
import com.hhp.cloud.shop.auth.vo.UserAuthVo;
import com.hhp.cloud.shop.common.core.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Description: 系统管理user远程服务
 * @author: hhp
 * @date: 2021/11/24 9:52
 */
@FeignClient(value = "shop-admin", contextId = "user", fallback = UserFeignServiceFallback.class)
public interface UserFeignService {

    /**
     * @Description: 根据用户名获取用户信息
     * @author: hhp
     * @Param: * @param username
     * @return: * @return
     * @date 2021/11/24 9:58
     */
    @GetMapping("/api/v1/admin/user/username/{username}")
    R<UserAuthVo> getUserByUsername(@PathVariable(value = "username") String username);
}
